﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Planetwork
{
    public partial class Logout : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if(Session["name"] != null)
            {              
              FormsAuthentication.SignOut();
              Session.Remove("name");
              Response.Write("<script>alert('已注销登录');window.location.href='Login.aspx';</script>");               
            }

            Response.Redirect("Login.aspx");
        }
    }
}